home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_casm / snpd9611.zip / WHICH_C.TXT < prev    next >
Text File  |  1996-11-24  |  7KB  |  159 lines

  1. .I 0 1
  2. +++Date last modified: 24-Nov-1995
  3. .D 1 1
  4. .I 2 2
  5. Q:  Which PC C/C++ compiler is best and what should I buy?
  6.  
  7. .I 155 11
  8. largely during the period following the Symantec acquisition of Zortech. As
  9. of version 6.1, the bugs were mostly fixed. Support of DOS graphics was also
  10. dropped, but an updated version of the excellent Flash Graphics package
  11. shipped with the Zortech versions is available from FlashTek, which also
  12. supplies improved versions of the 32-bit DOS extender and the pre-Symantec
  13. debugger. The current 7.0 release fixes almost all residual bugs and is
  14. significantly enhanced in the area of portability, supporting features of
  15. other DOS compilers such as the _interrupt keyword.
  16.  
  17. One caveat - if you have any version prior to the 6.1 release, be sure to
  18. upgrade!
  19. .D 156 8
  20. .I 228 1
  21. Drawbacks include almost non-existent 3rd party support and the pervasive IDE
  22. .D 229 1
  23. .I 232 2
  24. GNU C/C++ (GCC, G++; also DJGPP, EMX)
  25. -------------------------------------
  26. .D 233 2
  27. .I 239 5
  28. built-in in order to work in DOS's limited memory. The most popular of the
  29. DOS ports is DJGPP. OS/2 ports obviously don't share this limitation. The EMX
  30. port for OS/2 is among the best and is quite popular among OS/2 programmers.
  31. Along with SC++, WC++, and HC++, the gnu compilers round out the list of full
  32. ISO/ANSI/ARM compilers with explicit support for embedded systems.
  33. .D 240 5
  34. .I 327 124
  35.  
  36.  
  37. Q.  Do have any samples?
  38.  
  39. A:  The following program was compiled using several DOS compilers with the
  40.     results as noted below. The compilers tested are noted in the executable
  41.     program's name as follows:
  42.  
  43.       Suffix      Compiler                Notes
  44.       ------      --------                -----
  45.       _b45        Borland C 4.5
  46.       _b31        Borland C 3.1
  47.       _g32        gnu C (DJGPP 1.12M2)          GO32 32-bit DOS extender
  48.       _mc         Dunfield Micro-C 3.13
  49.       _ms         Microsoft C 8.0               Part of Visual C++ 1.5
  50.       _pc         Mix Power C 2.2
  51.       _sc         Symantec C 7.0
  52.       _s32        Symantec C 7.0                DOSX 32-bit DOS extender
  53.       _wc         Watcom C 10.0
  54.       _w32        Watcom C 10.0                 DOS/4GW 32-bit DOS extender
  55.       _zc         Zortech C 3.0r4
  56.       _z32        Zortech C 3.0r4               DOSX 32-bit DOS extender
  57.  
  58.     All executables were compiled with maximum optimization and with other
  59.     options (e.g. no exception handling for Borland 4.5) to assure minimum
  60.     size of the executables. The results for Zortech and Borland are for
  61.     comarison since both are several revision obsolete (however they do
  62.     highlight the fact that if all you want to do is compile straight C code,
  63.     sometimes the latest isn't always the greatest). The test file was
  64.     selected as an example of a minimally useful standard C program. Some
  65.     coding peculiarities were introduced to accomodate some non-standard
  66.     features of the Micro-C library.
  67.  
  68.     The program listing is followed by execution and compile times. The
  69.     machine used for the test was a 486/DX50 using Golden Bow's Vcache. Due
  70.     to the presense of the cache and the small size of the program, the
  71.     execution timings are probably only grossly representative. The timings
  72.     for the DJGPP-compiled test includes timings for both the compilation and
  73.     COFF-to-.EXE conversion required to produce a stand-alone executable. The
  74.     compilation time listing for WCL386 is for the Watcom-compiled version
  75.     using the DOS/4GW 32-bit DOS extender.
  76.   
  77. ----[ Size.C ]----------------------------------------------------------------
  78.  
  79. #include <stdio.h>
  80.  
  81. #ifndef __MICROC__
  82.  #include <string.h>
  83. #endif
  84.  
  85. main(int argc, char *argv[])
  86. {
  87.       char buf[80], *ptr;
  88.       FILE *me;
  89.  
  90.       if (NULL == (me = fopen("size.c", "r")))
  91.       {
  92.             fputs("Can't open SIZE.C\n", stderr);
  93.             return -1;
  94.       }
  95.       while (1)
  96.       {
  97.             if (NULL == fgets(buf, 80, me))
  98.                   break;
  99.             for (ptr = buf + strlen(buf) - 1;
  100.                   ptr >= buf && *ptr == '\n'; --ptr)
  101.             {
  102.                   *ptr = '\0';
  103.             }
  104.             printf("%s\n", buf);
  105.       }
  106.       return 0;
  107. }
  108.  
  109. ----[ Dr.Out ]----------------------------------------------------------------
  110.  
  111.  DR 3.00ß 
  112. Disk vol "STACVOL_DSK"
  113. Directory of D:\BINK\CODE\WIP
  114. 12 Files totalling 192,477 bytes
  115. 602,865,664 Bytes free
  116.  
  117. Size_mc  Com       2,105  ..a.rwx  20 Nov 95   9:59:42  < Micro-C 3.13
  118. Size_zc  Com       8,035  ..a.rwx  20 Nov 95   9:59:00  < ZTC 3.0r4
  119. Size_ms  Com       8,049  ..a.rwx  20 Nov 95  10:09:50  < MSC 8.0
  120. Size_b31 Com       8,776  ..a.rwx  20 Nov 95  10:11:24  < BC++ 3.1
  121. Size_wc  Com       9,318  ..a.rwx  20 Nov 95  10:03:46  < WC 10.0
  122. Size_sc  Com      10,528  ..a.rwx  20 Nov 95  10:04:48  < SC++ 7.0
  123. Size_b45 Com      11,216  ..a.rwx  20 Nov 95  10:07:20  < BC++ 4.5
  124. Size_pc  Exe      13,312  ..a.rwx  20 Nov 95  10:12:40  < Mix Power C 2.2
  125. Size_w32 Exe      25,994  ..a.rwx  20 Nov 95  10:21:44  < WC/DOS 4G/W
  126. Size_z32 Exe      27,941  ..a.rwx  20 Nov 95  10:17:44  < ZTC/DOSX
  127. Size_s32 Exe      29,149  ..a.rwx  20 Nov 95  10:18:42  < SC++/DOSX
  128. Size_g32 Exe      38,054  ..a.rwx  20 Nov 95  10:23:44  < DJGPP 1.12M2
  129.  
  130. ----[ Execution times ]-------------------------------------------------------
  131.  
  132. SIZE_WC     Elapsed time = 0.116001 Seconds     < WC 10.0
  133. SIZE_MS     Elapsed time = 0.116579 Seconds     < MSC 8.0
  134. SIZE_B31    Elapsed time = 0.121079 Seconds     < BC++ 3.1
  135. SIZE_PC     Elapsed time = 0.127011 Seconds     < Mix Power C 2.2
  136. SIZE_ZC     Elapsed time = 0.218889 Seconds     < ZTC 3.0r4
  137. SIZE_SC     Elapsed time = 0.221269 Seconds     < SC++ 7.0
  138. SIZE_MC     Elapsed time = 0.226919 Seconds     < Micro-C 3.13
  139. SIZE_B45    Elapsed time = 0.232461 Seconds     < BC++ 4.5
  140. SIZE_Z32    Elapsed time = 0.233987 Seconds     < ZTC/DOSX
  141. SIZE_G32    Elapsed time = 0.406291 Seconds     < DJGPP 1.12M2
  142. SIZE_S32    Elapsed time = 0.461156 Seconds     < SC++/DOSX
  143. SIZE_W32    Elapsed time = 1.299404 Seconds     < WC/DOS 4GW
  144.  
  145. ----[ Compile times ]---------------------------------------------------------
  146.  
  147. PC (Mix Power C) 2.2    1.505081 Seconds
  148. CC (Micro-C) 3.13       1.843561 Seconds
  149. ZTC 3.0r4               1.948132 Seconds
  150. SC 7.0                  3.002091 Seconds
  151. BCC 4.5                 4.108201 Seconds
  152. BCC 3.1                 4.586260 Seconds
  153. WCL 10.0                5.669630 Seconds
  154. WCL386 10.0             6.342555 Seconds
  155. CL (MSC) 8.0            6.697373 Seconds
  156. GCC (djgpp) 1.12M2      8.287935 Seconds
  157.  
  158. ----[ finis ]-----------------------------------------------------------------
  159.